// eslint-disable-next-line @typescript-eslint/no-unused-vars
import { getProjectRoot } from '@/api/project'
import useGlobal from '@/hooks/global/useGlobal'

export default (props, ctx) => {
  if (false) console.log(props, ctx)

  const { $formatTree } = useGlobal()
  const getAreaTreeData = async () => {
    const res = await getProjectRoot(false)
    return $formatTree(res.data)
  }

  return {
    getAreaTreeData
  }
}
